package com.validators;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

@Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE })
@Retention(RUNTIME)
@Constraint(validatedBy = { DateRangeValidator.class })
@Documented
public @interface DateRange {
	String message() default "{end} debe ser mayor a {start}";

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};

	/**
	 * Clase mapeada con JPA
	 */
	Class<?> entity();

	/**
	 * Propiedad a validar
	 */
	String property() default "nombre";

	String id() default "id";

	String daoName() default "dao";

	String start();

	String end();

	String tipo() default "";

	String objetoInterno() default "";
}
